<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglibs.jsp" %>

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta content="always" name="referrer">
    <title>异常事件</title>
    <link href="${ctxstatic}/css/custom-style.css" rel="stylesheet" type="text/css">


    <%@ include file="/WEB-INF/views/include/common.jsp" %>
    <style>

        .a-upload  input {
            position: absolute;
            font-size: 100px;
            right: 0;
            top: 0;
            opacity: 0;
            filter: alpha(opacity=0);
            cursor: pointer
        }

        #form_apply tr {
            line-height: 35px;
            margin-bottom: 4px;
        }

        #form_apply tr input, #form_apply select, #form_apply a {
            width: 144px;
        }

        #problem_description,#analysis_result,#exp_proce_results,#temp_disposal,#content{
            width: 347px;
        }
        #exception_type_id,#resp_dept{
            width: 146px;
        }
        #dept{
            width: 150px;
        }
        .QueryBar input{
            width: 140px;
        }
        .QueryBar select{
            width: 165px;
        }
        #preview_problem_description,#preview_analysis_result,#preview_exp_proce_results,#preview_temp_disposal{
            width: 600px;
        }
        #preview_table p{
            font-size: 16px;
        }
        #preview_table td{
            padding: 10px;
        }
    </style>
    <script>
        var username = "${user.username}";
    </script>
</head>

<body class="easyui-layout">
<div data-options="region:'north',border:false" style="padding: 10px 5px;">
    <span class="QueryBar">
        <input id="erp" class="easyui-textbox" data-options="label:'ERP'"/>
        <input id="machineType" class="easyui-textbox" data-options="label:'机型'" />
        <input id="conDept" class="easyui-textbox" data-options="label:'事业部'" />
        <input id="cusSentToName" class="easyui-textbox" data-options="label:'发往地'" />
        <input id="conBillNo" class="easyui-textbox" data-options="label:'订单号'" />
        <input id="subm_men" class="easyui-textbox" data-options="label:'提报人'"/>
        <input id="follow_up_people" class="easyui-textbox" data-options="label:'责任人'"/>
        <select id="wide_type" class="easyui-combobox" data-options="label:'广泛类'" >
            <option value="0">订单资料异常</option>
            <option value="1">机型履历异常</option>
        </select>
        <select id="dept_id" class="easyui-combobox" data-options="label:'责任部门'"></select>
        <select id="exception_type_id2" class="easyui-combobox" data-options="label:'问题属性'"></select>
        <select id="state" class="easyui-combobox" panelHeight="auto" name="state" data-options="label:'改善进度'">
            <option value="0">等待处理</option>
            <option value="1">正在处理</option>
            <option value="2">处理完成</option>
        </select>
        <span>
            <input id="occurrence_time_start" class="easyui-datetimebox" name="occurrence_time_start" data-options="label:'发生时间首',showSeconds:true">
            -
            <input id="occurrence_time_end" class="easyui-datetimebox" name="occurrence_time_end" data-options="label:'发生时间尾',showSeconds:true">
        </span>
        <span>
            <input id="submit_time_start" class="easyui-datetimebox" name="submit_time_start" data-options="label:'填报时间首',showSeconds:true">
            -
            <input id="submit_time_end" class="easyui-datetimebox" name="submit_time_end" data-options="label:'填报时间尾',showSeconds:true">
        </span>
        <!--<input id="operator_man_s" class="easyui-textbox" data-options="label:'操作人员'" style="width:300px;"/>-->
        <span style="margin-top: 5px">
             <a href="javascript:void(0)" onclick="queryRecord()" class="easyui-linkbutton button-blue" style="width: 50px;margin-left: 10px;">查询</a>
         <a href="javascript:void(0)" onclick="exportexcel()" class="easyui-linkbutton button-blue" style="width: 90px;margin-left: 10px;">按条件导出</a>
        </span>

    </span>
</div>
<div data-options="region:'center',border:false" style="height:100%">
    <table id="list">

    </table>
    <!-- 工具条 -->
    <div id="toolbar">
        <a id="addBtn" href="javascript:void(0)" onclick="add()" class="easyui-linkbutton" data-options="iconCls:'icon-add'">添加</a>
        <a id="editBtn" href="javascript:void(0)" onclick="edit()" class="easyui-linkbutton" data-options="iconCls:'icon-edit'">修改</a>
        <a id="deleteBtn" href="javascript:void(0)" onclick="remove()" class="easyui-linkbutton" data-options="iconCls:'icon-remove'">删除</a>
        <a id="openchartdlgBtn" href="javascript:void(0)" onclick="open_chart_dlg()" class="easyui-linkbutton">数据可视化图表</a>
    </div>
</div>

<div id="dlg_event">
    <div class="easyui-layout" data-options="fit:true,border:false">
        <div data-options="region:'center',border:false" style="height:100%;">
            <form id="form_event">
                <table style="margin: 0 auto; padding: 10px;">
                    <tr>
                        <td align="right">异常广泛类:</td>
                        <td>
                            <select class="easyui-combobox" data-options="required:true,limitToList:true" style="width: 146px;" id="form_wide_type" name="wide_type">
                                <option value="0">订单资料异常</option>
                                <option value="1">机型履历异常</option>
                            </select>
                        </td>
                        <td align="right">发生时间:</td>
                        <td>
                            <input id="form_occurrence_time" class="easyui-datetimebox" name="occurrence_time" data-options="required:true,showSeconds:true" value="">
                        </td>
                    </tr>
                    <tr>
                        <td align="right">erp编号:</td>
                        <td>
                            <input id="form_erp" name="erp" class="easyui-textbox"
                                   data-options="required:true"/>
                        </td>
                        <td align="right">问题属性:</td>
                        <td>
                            <select data-options="required:true,limitToList:true" id="exception_type_id" name="exception_type_id" class="easyui-combobox"></select>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">提报人:</td>
                        <td>
                            <input data-options="required:true" id="form_subm_men" name="subm_men" class="easyui-textbox"/>
                        </td>
                        <td align="right">责任部门:</td>
                        <td>
                            <select data-options="required:true,limitToList:true" id="resp_dept" name="resp_dept" class="easyui-combobox"></select>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">责任人:</td>
                        <td>
                            <input data-options="required:true" id="form_follow_up_people" name="follow_up_people" class="easyui-textbox"/>
                        </td>
                        <td align="right">产品类型:</td>
                        <td>
                            <select class="easyui-combobox" data-options="required:true,limitToList:true" style="width: 146px;" id="pro_type" name="pro_type">
                                <option value="PON">PON</option>
                                <option value="OTT">OTT</option>
                                <option value="DVB">DVB</option>
                                <option value="NB模组">NB模组</option>
                                <option value="路由器">路由器</option>
                                <option value="摄像头">摄像头</option>
                                <option value="执法记录仪">执法记录仪</option>
                                <option value="融合网关">融合网关</option>
                                <option value="其他类别">其他类别</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">问题描述:</td>
                        <td colspan="3">
                            <input id="problem_description" style="height: 80px;" name="problem_description" data-options="multiline:true" class="easyui-textbox"/>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">工程分析:</td>
                        <td colspan="3">
                            <input id="analysis_result" style="height: 80px;" name="analysis_result" data-options="multiline:true" class="easyui-textbox"/>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">长期方案:</td>
                        <td colspan="3">
                            <input id="exp_proce_results" style="height: 80px;" name="exp_proce_results" data-options="multiline:true" class="easyui-textbox"/>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">临时方案:</td>
                        <td colspan="3">
                            <input id="temp_disposal" style="height: 80px;" name="temp_disposal" data-options="multiline:true" class="easyui-textbox"/>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<div id="dlg_event_preview">
    <div class="easyui-layout" data-options="fit:true,border:false">
        <div data-options="region:'center',border:false" style="height:100%;">
                <table id="preview_table" border="2px" style="margin: 0 auto; padding: 10px;">
                    <tr>
                        <td align="right">异常广泛类:</td>
                        <td >
                            <p id="preview_wide_type" name="preview_wide_type"></p>
                        </td>
                        <td align="right">发生时间:</td>
                        <td>
                            <p id="preview_occurrence_time" name="preview_occurrence_time">
                        </td>
                    </tr>
                    <tr>
                        <td align="right">erp编号:</td>
                        <td>
                            <p id="preview_erp" name="preview_erp"></p>
                        </td>
                        <td align="right">异常类型:</td>
                        <td>
                            <p id="preview_exception_type_name" name="preview_exception_type_name"></p>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">提报人:</td>
                        <td>
                            <p id="preview_subm_men" name="preview_subm_men"></p>
                        </td>
                        <td align="right">责任部门:</td>
                        <td>
                            <p id="preview_dept" name="preview_dept"></p>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">责任人:</td>
                        <td>
                            <p id="preview_follow_up_people" name="follow_up_people"></p>
                        </td>
                        <td align="right">产品类型:</td>
                        <td>
                            <p id="preview_pro_type" name="pro_type"></p>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">问题描述:</td>
                        <td colspan="3">
                            <p id="preview_problem_description" name="preview_problem_description"></p>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">工程分析:</td>
                        <td colspan="3">
                            <p id="preview_analysis_result" name="preview_analysis_result"></p>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">长期方案:</td>
                        <td colspan="3">
                            <p id="preview_exp_proce_results" name="preview_exp_proce_results"></p>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">临时方案:</td>
                        <td colspan="3">
                            <p id="preview_temp_disposal" name="preview_temp_disposal"></p>
                        </td>
                    </tr>
                </table>
        </div>
    </div>
</div>
<div id="dlg_details">
    <div class="easyui-layout" data-options="fit:true,border:false">
        <div data-options="region:'center',border:false" style="height:100%;">
            <table id="details_list">

            </table>
            <!-- 工具条 -->
            <div id="details_list_toolbar">
                <a id="addDtlBtn" href="javascript:void(0)" onclick="addDtl()" class="easyui-linkbutton" data-options="iconCls:'icon-add'">添加</a>
                <a id="editDtlBtn" href="javascript:void(0)" onclick="editDtl()" class="easyui-linkbutton" data-options="iconCls:'icon-edit'">修改</a>
                <a id="deleteDtlBtn" href="javascript:void(0)" onclick="removeDtl()" class="easyui-linkbutton" data-options="iconCls:'icon-remove'">删除</a>
                <a id="FigureOutBtn" href="javascript:void(0)" onclick="FigureOut()" class="easyui-linkbutton" data-options="iconCls:'icon-edit'">此异常已处理完成</a>
            </div>
        </div>
    </div>
</div>
<div id="dlg_dtl">
    <div class="easyui-layout" data-options="fit:true,border:false">
        <div data-options="region:'center',border:false" style="height:100%;">
            <input id="dlg_event_id" name="id" style="display: none">
            <form id="form_dtl">
                <table style="margin: 0 auto; padding: 10px;">
                    <tr>
                        <td align="right">处理部门:</td>
                        <td colspan="3">
                            <select id="dept" name="dept" class="easyui-combobox"></select>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">处理内容:</td>
                        <td colspan="3">
                            <input id="content" style="height: 80px;" name="content" data-options="multiline:true" class="easyui-textbox"/>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<div id="dlg_chart">
    <div class="easyui-layout" data-options="fit:true,border:false">
        <div data-options="region:'center',border:false" style="height:100%;">
            <form id="chart_form" style="margin: 10px;">
                <span>
                <input id="Statistical_time_start" style="width: 160px;" class="easyui-datetimebox" name="Statistical_time_start" data-options="label:'时间区间首',showSeconds:true">
                -
                <input id="Statistical_time_end" style="width: 160px;" class="easyui-datetimebox" name="Statistical_time_end" data-options="label:'时间区间尾',showSeconds:true">
                </span>
                <a href="javascript:void(0)" onclick="refChart(0)" class="easyui-linkbutton button-blue" style="margin-left: 5px;">异常类型嵌套饼图</a>
                <a href="javascript:void(0)" onclick="refChart(1)" class="easyui-linkbutton button-blue" style="margin-left: 5px;">异常类型柱状图</a>
                <a href="javascript:void(0)" onclick="refChart(2)" class="easyui-linkbutton button-blue" style="margin-left: 5px;">责任部门柱状图</a>
            </form>

            <div id="chartMain" style="height: 100%">

            </div>
        </div>
    </div>
</div>
</body>
<script src="${ctxstatic}/js/echarts.min.js" type="text/javascript"></script>
<script src="${ctxstatic}/plugin/easyui/themes/insdep/expand/jquery-easyui-datagridview/datagrid-groupview.js" type="text/javascript"></script>
<script src="${ctxstatic}/js/exManage/exceptionEvent.js" type="text/javascript"></script>
</html>